package com.qf.feign;

import com.qf.pojo.User;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;

/*
 *@Description:
 *@author:刘哥
 *@Date:86180 2022/10/10 20:15
 */
//feign的兜底功能,谁调用谁兜底,继承调用接口
@Component
@RequestMapping("/fallBack")
public class SearchFallBack implements SearchFeign{
    @Override
    public String Hello() {
        return "服务器繁忙";
    }

    @Override
    public User findUserById(Integer id) {
        User user = new User();
        user.setId(00);
        user.setName("服务器繁忙");
        return user;
    }

    @Override
    public String insertUser(User user) {
        return "服务器繁忙";
    }
}
